feat: add C implementation for stats/base/dists/erlang/logpdf#10719
feat: add C implementation for stats/base/dists/erlang/logpdf#10719rautelaKamal wants to merge 3 commits intostdlib-js:developfrom
Conversation
|
Hello! Thank you for your contribution to stdlib. We noticed that the contributing guidelines acknowledgment is missing from your pull request. Here's what you need to do:
This acknowledgment confirms that you've read the guidelines, which include:
We can't review or accept contributions without this acknowledgment. Thank you for your understanding and cooperation. We look forward to reviewing your contribution! |
Coverage Report
The above coverage report was generated for the changes in this PR. |
55dc671 to
b76bc1a
Compare
2b8636f to
93de059
Compare
stats/base/dists/erlang/logpdf
| var i; | ||
|
|
||
| len = 100; | ||
| x = new Float64Array( len ); |
There was a problem hiding this comment.
We should go ahead and migrate to using random/array/uniform and random/array/discrete-uniform directly, as done in other dists packages.
There was a problem hiding this comment.
I've migrated the benchmarks to use random/array/uniform and random/array/discrete-uniform in the latest push. This PR should be ready for re-review.
| t.strictEqual( y, expected[i], 'x: '+x[i]+', k: '+k[i]+', lambda: '+lambda[i]+', y: '+y+', expected: '+expected[i] ); | ||
| } else { | ||
| delta = abs( y - expected[ i ] ); | ||
| tol = 450.0 * EPS * abs( expected[ i ] ); |
There was a problem hiding this comment.
We should go ahead and use isAlmostSameValue for ULP-based testing.
There was a problem hiding this comment.
I've migrated the tests to use isAlmostSameValue for ULP-based testing in the latest push. This PR should be ready for re-review.
93de059 to
7a15449
Compare
stats/base/dists/erlang/logpdf7a15449 to
54bf6dd
Compare
This PR adds a C implementation for
@stdlib/stats/base/dists/erlang/logpdf.Closes #3571
Changes
Added
src/addon.c: Node.js native addon entry pointsrc/main.c: C implementation delegating tostdlib_base_dists_gamma_logpdfinclude/stdlib/stats/base/dists/erlang/logpdf.h: C header filelib/native.js: JavaScript wrapper for native addonbenchmark/benchmark.native.js: Native benchmarkmanifest.json: Build manifestpackage.json: Addedgypfile,include, andsrcdirectoriesRead, understood, and followed the contributing guidelines
AI Assistance